#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QFileDialog>
#include<QPlainTextEdit>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QPlainTextEdit* edit=new QPlainTextEdit();
    this->setCentralWidget(edit);
    QString path=QFileDialog::getOpenFileName(this);
    QFile file(path);
    bool ret=file.open(QFile::ReadOnly);
    if(!ret)
    {
        "打开文件失败";
    }
    file.readAll();
    file.close();

}

MainWindow::~MainWindow()
{
    delete ui;
}

